/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.uoc.tdp.pac4.comun;

import edu.uoc.tdp.pac4.beans.Taller;
import edu.uoc.tdp.pac4.beans.Usuari;
import edu.uoc.tdp.pac4.beans.Perfil;
import java.rmi.RemoteException;
import java.rmi.Remote;
import java.sql.SQLException;
import java.util.ArrayList;


/**
 *
 * @author hphis
 */
public interface GestorConexionInterface extends Remote {
    
     public int usuariLogin(String username, String password) throws RemoteException, SQLException;
     public String saludo() throws RemoteException;
     public Usuari loadUsuari(int id) throws RemoteException, SQLException;
     public void saveUsuari(Usuari u) throws RemoteException, SQLException ;
     public void createUsuari(Usuari u) throws RemoteException, SQLException ;
     public void delUser(int id) throws RemoteException, SQLException ;
     public ArrayList<Usuari> getLlistaUsuaris() throws RemoteException, SQLException; 
     public Object[][] getLlistaUsuarisTaula() throws RemoteException, SQLException;      
     public ArrayList<Taller> getLlistaTallers() throws RemoteException, SQLException ;
     public Taller loadTaller(int id) throws RemoteException, SQLException ;     
     public ArrayList<Perfil> getLlistaPerfils() throws RemoteException, SQLException ;
     public Perfil loadPerfil(int id) throws RemoteException, SQLException ;  
     public boolean checkUsername(String username) throws RemoteException, SQLException ; 
     public Usuari loadCapTaller(int id) throws RemoteException, SQLException ;
     public void saveTaller(Taller t) throws RemoteException, SQLException ;
     public void createTaller(Taller t) throws RemoteException, SQLException ;
     public boolean checkCif(String cif) throws RemoteException, SQLException ;
     public void delTaller(int id) throws RemoteException, SQLException ;
     public ArrayList<Usuari> cercarUsuaris(String text, Taller t, Perfil p) throws RemoteException, SQLException ;
     public ArrayList<Taller> cercarTallers(String text) throws RemoteException, SQLException;
}
